package com.xydtech.ecard.config.service.impl;

import java.util.List;
import com.xydtech.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xydtech.ecard.config.mapper.EcardPosterShareListMapper;
import com.xydtech.ecard.config.domain.EcardPosterShareList;
import com.xydtech.ecard.config.service.IEcardPosterShareListService;
import com.xydtech.common.core.text.Convert;

/**
 * 海报分享配置记录Service业务层处理
 * 
 * @author xydtech
 * @date 2022-12-05
 */
@Service
public class EcardPosterShareListServiceImpl implements IEcardPosterShareListService 
{
    @Autowired
    private EcardPosterShareListMapper ecardPosterShareListMapper;

    /**
     * 查询海报分享配置记录
     * 
     * @param id 海报分享配置记录主键
     * @return 海报分享配置记录
     */
    @Override
    public EcardPosterShareList selectEcardPosterShareListById(Long id)
    {
        return ecardPosterShareListMapper.selectEcardPosterShareListById(id);
    }

    /**
     * 查询海报分享配置记录列表
     * 
     * @param ecardPosterShareList 海报分享配置记录
     * @return 海报分享配置记录
     */
    @Override
    public List<EcardPosterShareList> selectEcardPosterShareListList(EcardPosterShareList ecardPosterShareList)
    {
        return ecardPosterShareListMapper.selectEcardPosterShareListList(ecardPosterShareList);
    }

    /**
     * 新增海报分享配置记录
     * 
     * @param ecardPosterShareList 海报分享配置记录
     * @return 结果
     */
    @Override
    public int insertEcardPosterShareList(EcardPosterShareList ecardPosterShareList)
    {
        ecardPosterShareList.setCreateTime(DateUtils.getNowDate());
        return ecardPosterShareListMapper.insertEcardPosterShareList(ecardPosterShareList);
    }

    /**
     * 修改海报分享配置记录
     * 
     * @param ecardPosterShareList 海报分享配置记录
     * @return 结果
     */
    @Override
    public int updateEcardPosterShareList(EcardPosterShareList ecardPosterShareList)
    {
        return ecardPosterShareListMapper.updateEcardPosterShareList(ecardPosterShareList);
    }

    /**
     * 批量删除海报分享配置记录
     * 
     * @param ids 需要删除的海报分享配置记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardPosterShareListByIds(String ids)
    {
        return ecardPosterShareListMapper.deleteEcardPosterShareListByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除海报分享配置记录信息
     * 
     * @param id 海报分享配置记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardPosterShareListById(Long id)
    {
        return ecardPosterShareListMapper.deleteEcardPosterShareListById(id);
    }
}
